# Contributor: Carbon Jiao <http://archlive-pkg.googlecode.com>
pkgname=gmbox-svn
pkgver=161
pkgrel=1
url="http://li2z.cn/2009/08/02/gmbox-0-1/"
pkgdesc="Google Music Downloader. SVN rev."
arch=('i686' 'x86_64')
license=('GPL')
makedepends=()
depends=('python' 'gtk' 'pygtk' 'pygobject' 'pycairo' 'python-notify')
provides=('gmbox')
replace=('gmbox')
optdepends=("python-pymedia: A Python library for accessing and manipulating multimedia files")
install=()
source=()
md5sums=()

_svntrunk=http://gmbox.googlecode.com/svn/trunk/
_svnmod=gmbox

build() {

	cd $srcdir

	msg "Checking out source..."
	if [ -d $_svnmod/.svn ]; then
		cd $_svnmod && svn up -r $pkgver
	else
		svn co $_svntrunk $_svnmod
	fi
	install -d $pkgdir/usr/bin
	install -d $pkgdir/usr/share/gmbox/{lib,pixbufs,data}
	install -m 0644 $srcdir/$_svnmod/pixbufs/*.png $pkgdir/usr/share/gmbox/pixbufs
	install -m 0644 $srcdir/$_svnmod/data/config.xml.sample $pkgdir/usr/share/gmbox/data
	install -m 0755 $srcdir/$_svnmod/src/{cli,mainwin}.py $pkgdir/usr/share/gmbox/
	install -m 0644 $srcdir/$_svnmod/src/{downpage,player,statusbar,tabview,treeview}.py $pkgdir/usr/share/gmbox/
	install -m 0644 $srcdir/$_svnmod/src/lib/*.py $pkgdir/usr/share/gmbox/lib
	install -Dm 0644 $srcdir/$_svnmod/gmbox.desktop $pkgdir/usr/share/applications/gmbox.desktop
	cd $pkgdir/usr/bin
	ln -sf ../share/gmbox/cli.py ./gmbox
}
